// 茶咖酒具数据项
const goodsBody=[
    {
        id:'1',
        picture:'https://yanxuan-item.nosdn.127.net/4356c9fc150753775fe56b465314f1eb.png',
        name:'大师监制龙泉青瓷茶叶罐',
        desc:'世界非遗|青瓷世家出品|釉润如玉',
        price:'¥139.00'
    },
    {
        id:'1',
        picture:'https://yanxuan-item.nosdn.127.net/3346b7b92f9563c7a7e24c7ead883f18.jpg',
        name:'日式黑陶功夫茶组双侧把茶具礼盒装',
        desc:'日式风格单把设计防烫隔热美观大气',
        price:'¥288.00'
    },
    {
        id:'1',
        picture:'https://yanxuan-item.nosdn.127.net/fc266553a5b00280ab835e83a660ef14.jpg',
        name:'智能温控细嘴流速刚刚好咖啡手冲壶电热水壶',
        desc:'智能温控出水流畅，容易操控',
        price:'¥389.00'
    },
    {
        id:'1',
        picture:'https://yanxuan-item.nosdn.127.net/44e51622800e4fceb6bee8e616da85fd.png',
        name:'古法温酒汝瓷酒具套装白酒杯莲花温酒器',
        desc:'以汝瓷为载体制作的温酒器套组，酒器精美，酒杯玲珑、淡淡的天青釉色，足以让酒席上，再添几分色彩。',
        price:'¥488.00'
    },
    {
        id:'1',
        picture:'https://yanxuan-item.nosdn.127.net/b011048adc2bf3952c72e741e47d1419.jpg',
        name:'电动红酒醒酒器分酒器取酒器',
        desc:'贴心醒酒阀设计，随心开启，自由切换、轻松开启和关闭醒酒器功能',
        price:'¥169.00'
    }
]

const htmlStr = goodsBody.reduce(function(prev,item){
    //解构
    const{picture,name,desc,price}=item
    return prev +`
    <a href="./detailList.html" class="goodsItem">
                    <img src="${picture}" alt="">
                    <p class="name">${name}</p>
                    <p class="desc">${desc}</p>
                    <p class="price">${price}</p>
                </a>`
},'')
document.querySelector('.body').innerHTML=htmlStr

